package com.group.mall.mapper;


import com.group.mall.domain.POJO.Cart;
import com.group.mall.domain.POJO.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;


/**
 * @Author：xiexu
 * @Date：2024/6/18 14:41
 */
@Mapper
public interface CartMapper {
    List<ShoppingCart> listCart(Integer userId);

    boolean addCart(ShoppingCart cart);

    List<ShoppingCart> getCartById(Integer userId);

    boolean deleteCartById(Integer cartId, Integer userId);
    

    boolean updateCart(ShoppingCart cart);

//    Cart selectCartByUserIdAndItemId(Integer goodsId, Integer userId);
    ShoppingCart selectCartByUserIdAndItemId(Integer goodsId);
}
